package Test;

public class Test8 {
    public static void main(String[] args) {
        /*int[][] arr = {{1,2,3},{4,5,6}};
        for (int i = 0; i <arr.length;i++){
            for (int j = 0; j < arr[i].length;j++){
                System.out.print(arr[i][j]);
            }
            System.out.println();
        }*/
        int[] a = {22,66,44};
        int[] b = {77,33,88};
        int[] c = {25,45,65};
        int[] d = {11,66,99};
        int[][] arr = new int[4][];
        arr[0] = a;
        arr[1] = b;
        arr[2] = c;
        arr[3] = d;
        for (int i = 0; i < arr.length;i++){
            for (int j = 0; j < arr[i].length;j++){
                System.out.print(arr[i][j]);
                System.out.print(" ");
            }
            System.out.println();
        }
        for (int i = 0; i < arr.length;i++){
            int e=0;
            for (int j = 0; j < arr[i].length;j++){
                e = e + arr[i][j];
            }System.out.println("第"+(i+1)+"季度的营业额为："+e);
        }
        int z=0;
        for (int i = 0; i < arr.length;i++){
            for (int j = 0; j < arr[i].length;j++){
                z = z + arr[i][j];
            };
        }
        System.out.println("全年的营业额为："+z);
    }
}
